package com.zhejiangzhengyuan.municipal_common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * <p>
 * 巡检事件表，用于记录市政设施养护巡检任务中发现的事件数据
 * </p>
 *
 * @author linju
 * @since 2019-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="InspectionEvent对象", description="巡检事件表，用于记录市政设施养护巡检任务中发现的事件数据")
public class InspectionEvent extends Model<InspectionEvent> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "巡检事件数据来源，关联字典条目表")
    private String dataOrigin;

    @ApiModelProperty(value = "巡检事件类型，关联字典条目表")
    private String type;

    @ApiModelProperty(value = "巡检事件中问题主体，记录道路或桥梁的数据code")
    private String facilityId;

    @ApiModelProperty(value = "事件原因记录")
    private String reason;

    @ApiModelProperty(value = "事件详细内容描述")
    private String context;

    @ApiModelProperty(value = "事件等级，根据系统业务而定")
    private String level;

    @ApiModelProperty(value = "事件上报人")
    private Long reportUserInfoId;

    @ApiModelProperty(value = "巡检事件记录表的id")
    private Long inspectionRecordId;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "记录创建时间")
    private Timestamp createTime;

    @ApiModelProperty(value = "记录更新时间")
    private Timestamp updateTime;

    @ApiModelProperty(value = "是否复位，默认为否")
    private String reset;

    @ApiModelProperty(value = "复位原因")
    private String resetReason;

    @ApiModelProperty(value = "是否派单")
    private boolean sendOrder;

    @ApiModelProperty(value = "问题道路或桥梁的具体位置")
    private String geometry;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
